package hcom.model.board.action;

import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.swing.ListSelectionModel;

import org.apache.commons.io.FileUtils;
import org.apache.struts2.ServletActionContext;

import hcom.model.board.bean.BoardBean;
import hcom.model.board.dao.BoardDao;

import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.ModelDriven;
import com.opensymphony.xwork2.Preparable;
import com.opensymphony.xwork2.util.location.Location;

import ecg.util.MailManager;
import ecg.util.PaggingMakerUtil;

public class BoardAction extends ActionSupport implements Preparable, ModelDriven<BoardBean> {
	
	private BoardBean boardBean;
	
	private BoardDao dao = BoardDao.getInstance();
	
	private BoardBean boardView;
	private BoardBean printView1;
	private BoardBean printView2;
	private BoardBean printView3;
	private BoardBean fileView;
	
	private BoardBean answerFile;
	
	private List<BoardBean> list;
	private List<BoardBean> printlist2;
	private List<BoardBean> printlist3;
	
	//file upload
	private File upload;
	private String uploadFileName;
	private String uploadContentType;
	//file uploads
	private List<File> uploads = new ArrayList<File>();
	private List<String> uploadsFileName = new ArrayList<String>();
	private List<String> uploadsContentType = new ArrayList<String>();
	private String fileUpLoadPath = "";	
	private String filePath = "";
	private String timeFolderName = "";

	//private File[] uploads_Array = new File[3];
	
	

	//file download
	private InputStream inputStream;
	private int contentLength;
	private String contentDisposition;
	private String downFile;	

	//paging
	private String [] imgs  = {"/images/common/icon_page_prev.png",null,"/images/common/icon_page_next.png"};
	private int totalCount;
	
	public String getBoardList() throws Exception {
		System.out.println("넘어온 코드값 : "+boardBean.getBoard_code());
		if(boardBean.getCurrentPage() < 1) {
			boardBean.setCurrentPage(1);
			System.out.println(boardBean.getCurrentPage());
		} else {
			boardBean.setCurrentPage(boardBean.getCurrentPage());
		}
		boardBean.setStartData((boardBean.getCurrentPage()-1)*boardBean.getCountPerPage());
		boardBean.setEndData(boardBean.getCountPerPage());
		
		setList(dao.getBoardList(boardBean.getBoard_code(),boardBean.getSearch(),boardBean.getSearchKeyword(),boardBean.getStartData(), boardBean.getEndData()));
		
		totalCount = dao.getBoardCount(boardBean.getBoard_code());
		boardBean.setNumber(totalCount-(boardBean.getCurrentPage()-1));
		boardBean.setTotalCount(totalCount-(boardBean.getCurrentPage()-1)*10);
		
		boardBean.setPagingStr(PaggingMakerUtil.indexList(imgs, boardBean.getCurrentPage(), boardBean.getCountPerPage(), boardBean.getNumPerPagging(), totalCount));
		
		boardBean.setBoard_code(boardBean.getBoard_code());

		return SUCCESS;
	}
	
	public String getCaseList() throws Exception {
		System.out.println("넘어온 코드값 : "+boardBean.getBoard_code());
		if(boardBean.getCurrentPage() < 1) {
			boardBean.setCurrentPage(1);
			System.out.println(boardBean.getCurrentPage());
		} else {
			boardBean.setCurrentPage(boardBean.getCurrentPage());
		}
		boardBean.setStartData((boardBean.getCurrentPage()-1)*boardBean.getCountPerPage());
		boardBean.setEndData(boardBean.getCountPerPage());
		boardBean.setStartData((boardBean.getCurrentPage()-1)*boardBean.getCountPerPage());
		boardBean.setEndData(boardBean.getCountPerPage());
		//리스트 가져오기
		setList(dao.getCaseList(boardBean.getSearch(),boardBean.getSearchKeyword(),boardBean.getStartData(), boardBean.getEndData(), boardBean.getSearch_field(), boardBean.getSearch_text()));
		totalCount = dao.getCaseCount(boardBean);
		boardBean.setNumber(totalCount-(boardBean.getCurrentPage()-1));
		boardBean.setTotalCount(totalCount-(boardBean.getCurrentPage()-1)*10);
		
		boardBean.setPagingStr(PaggingMakerUtil.indexList(imgs, boardBean.getCurrentPage(), boardBean.getCountPerPage(), boardBean.getNumPerPagging(), totalCount));

		return SUCCESS;
	}
	
	public String getCasepotalList() throws Exception {
		System.out.println("넘어온 코드값 : "+boardBean.getBoard_code());
		if(boardBean.getCurrentPage() < 1) {
			boardBean.setCurrentPage(1);
			System.out.println(boardBean.getCurrentPage());
		} else {
			boardBean.setCurrentPage(boardBean.getCurrentPage());
		}
		boardBean.setStartData((boardBean.getCurrentPage()-1)*boardBean.getCountPerPage());
		boardBean.setEndData(boardBean.getCountPerPage());
		boardBean.setStartData((boardBean.getCurrentPage()-1)*boardBean.getCountPerPage());
		boardBean.setEndData(boardBean.getCountPerPage());
		//리스트 가져오기
		setList(dao.getCasepotalList(boardBean.getSearch(),boardBean.getSearchKeyword(),boardBean.getStartData(), boardBean.getEndData(), boardBean.getSearch_field(), boardBean.getSearch_text()));
		totalCount = dao.getCaseCount(boardBean);
		boardBean.setNumber(totalCount-(boardBean.getCurrentPage()-1));
		boardBean.setTotalCount(totalCount-(boardBean.getCurrentPage()-1)*10);
		
		boardBean.setPagingStr(PaggingMakerUtil.indexList(imgs, boardBean.getCurrentPage(), boardBean.getCountPerPage(), boardBean.getNumPerPagging(), totalCount));

		return SUCCESS;
	}
	
	public String getCaseDetail() throws Exception {
		
		boardView = dao.getcaseView(boardBean.getCase_seq(),boardBean.getMem_dept());

		return SUCCESS;
	}
	
	public String getCaseDetail1() throws Exception {
			
		boardView = dao.getcaseDetail(boardBean.getCase_seq(),boardBean.getCourt_step());
		//첨부파일까지 조회
		setList(dao.getCase(boardBean.getCase_seq(),boardBean.getCourt_step()));

		return SUCCESS;
	}
	public String getCaseDetail2() throws Exception {
		
		boardView = dao.getcaseDetail(boardBean.getCase_seq(),boardBean.getCourt_step());
		printView3 = dao.getcaseDetail(boardBean.getCase_seq(),"3");
		//첨부파일까지 조회
		setList(dao.getCase(boardBean.getCase_seq(),boardBean.getCourt_step()));
		
		return SUCCESS;
	}
	/*인쇄*/
	public String getprintView1() throws Exception {
				
		boardView = dao.getcaseView(boardBean.getCase_seq(),boardBean.getMem_dept());
		printView1 = dao.getcaseDetail(boardBean.getCase_seq(),boardBean.getCourt_step());

		setList(dao.getCase(boardBean.getCase_seq(),boardBean.getCourt_step()));
		
		return SUCCESS;
	}
	public String getprintView2() throws Exception {
		
		boardView = dao.getcaseView(boardBean.getCase_seq(),boardBean.getMem_dept());
		printView1 = dao.getcaseDetail(boardBean.getCase_seq(),"1");
		printView2 = dao.getcaseDetail(boardBean.getCase_seq(),boardBean.getCourt_step());
		
		setList(dao.getCase(boardBean.getCase_seq(),"1"));
		setPrintlist2(dao.getCase(boardBean.getCase_seq(),boardBean.getCourt_step()));
		
		
		return SUCCESS;
	}
	public String getprintView3() throws Exception {
		
		boardView = dao.getcaseView(boardBean.getCase_seq(),boardBean.getMem_dept());
		printView1 = dao.getcaseDetail(boardBean.getCase_seq(),"1");
		printView2 = dao.getcaseDetail(boardBean.getCase_seq(),"2");
		printView3 = dao.getcaseDetail(boardBean.getCase_seq(),boardBean.getCourt_step());
		
		setList(dao.getCase(boardBean.getCase_seq(),"1"));
		setPrintlist2(dao.getCase(boardBean.getCase_seq(),"2"));
		setPrintlist3(dao.getCase(boardBean.getCase_seq(),boardBean.getCourt_step()));
		
		return SUCCESS;
	}
	
	
	public String getCaseDetail3() throws Exception {
		
		boardView = dao.getcaseDetail(boardBean.getCase_seq(),boardBean.getCourt_step());
		//첨부파일까지 조회
		setList(dao.getCase(boardBean.getCase_seq(),boardBean.getCourt_step()));
		
		return SUCCESS;
	}
	
	public String getAddCase() throws Exception {
		
		boardView = dao.getcaseDetail(boardBean.getCase_seq(),boardBean.getCourt_step());
		setList(dao.getCase(boardBean.getCase_seq(),boardBean.getCourt_step()));
		return SUCCESS;
	}
	
	
	public String getBoardDetail() throws Exception {
		boardView = dao.getBoardView(boardBean.getBoard_seq());
		
		//조회수 증가
		int count = boardView.getRead_count() + 1;
		dao.increaseCount(boardView.getBoard_seq(), count);
		
		boardView.setRead_count(count);
		setBoardView(boardView);
		
		//첨부파일 조회
		fileView = dao.getFile(boardBean.getBoard_seq(),"board");
		//추가 
		answerFile = dao.getoneFile(boardBean.getBoard_seq(),"answer");
		//파일이름 줄이기 
		//System.out.println(fileView.getFile_name1().substring(fileView.getFile_name1().lastIndexOf("/") + 1));
		if(fileView.getFile_name1() != null){
			fileView.setFile_name1(fileView.getFile_name1().substring(fileView.getFile_name1().lastIndexOf("/") + 1));
		}
		if(fileView.getFile_name2() != null){
			fileView.setFile_name2(fileView.getFile_name2().substring(fileView.getFile_name2().lastIndexOf("/") + 1));
		}
		if(fileView.getFile_name3() != null){
			fileView.setFile_name3(fileView.getFile_name3().substring(fileView.getFile_name3().lastIndexOf("/") + 1));
		}
		/*answerFile = dao.getFile(boardBean.getBoard_seq(),"answer");*/
		
		return SUCCESS;
	}
	
	public String insertBoardForm() throws Exception {
		System.out.println("****"+boardBean.getBoard_code());
		boardBean.setBoard_code(boardBean.getBoard_code());
		return SUCCESS;
	}
	
	public String insertCaseForm() throws Exception {
		return SUCCESS;
	}
		
	public String caseRegpop() throws Exception {
		return SUCCESS;
	}
	
	public String caseAddgopop2() throws Exception {
		return SUCCESS;
	}
	public String caseAddgopop3() throws Exception {
		return SUCCESS;
	}
	
	public String caseModiRegpop() throws Exception {
		boardView = dao.getContentDetail(boardBean.getCase_seq(),boardBean.getCourt_step(),boardBean.getLog_seq());
			
		return SUCCESS;
	}
	
	public String caseAddpop() throws Exception {
		dao.insertlogseq(boardBean.getCase_seq(),boardBean.getCourt_step());
		//방금 들어간 log_seq 가져오기 
		boardView = dao.getToplogSeq();
		boardBean.setLog_seq(boardView.getLog_seq());
		return SUCCESS;
	}
	
	public String insertCase() throws Exception {
		ActionContext context = ActionContext.getContext();
		filePath = getText("path.upload.board");
		String result = "SUCCESS";
		
		dao.insertCase(boardBean);
		
		return result;
	}
	
	public String caseupdatego() throws Exception {
		boardView = dao.getcaseView(boardBean.getCase_seq(),boardBean.getMem_dept());
		/*fileView = dao.getFile(boardBean.getBoard_seq(),boardBean.getSave_type());*/
	
		return SUCCESS;
	}
	
	public String caseupdatego1() throws Exception {
		boardView = dao.getcaseDetail(boardBean.getCase_seq(),boardBean.getCourt_step());
		setList(dao.getCase(boardBean.getCase_seq(),boardBean.getCourt_step()));
	
		return SUCCESS;
	}
	public String caseupdatego2() throws Exception {
		boardView = dao.getcaseDetail(boardBean.getCase_seq(),boardBean.getCourt_step());
		setList(dao.getCase(boardBean.getCase_seq(),boardBean.getCourt_step()));
	
		return SUCCESS;
	}
	public String caseupdatego3() throws Exception {
		boardView = dao.getcaseDetail(boardBean.getCase_seq(),boardBean.getCourt_step());
		setList(dao.getCase(boardBean.getCase_seq(),boardBean.getCourt_step()));
	
		return SUCCESS;
	}
	
	public String caseAddReggo2() throws Exception {
		/*boardView = dao.getcaseDetail(boardBean.getCase_seq(),boardBean.getCourt_step());
		setList(dao.getCase(boardBean.getCase_seq(),boardBean.getCourt_step()));*/
		//System.out.println("case_seq :" +boardBean.getCase_seq());
		dao.casecourt2(boardBean.getCase_seq());
		
		//System.out.println("case_seq :" +boardBean.getCase_seq());
		//boardView = new BoardBean();
		//boardView.setCase_seq(boardBean.getCase_seq());
		//setBoardView(boardBean);
		//totalCount = 95;
		return SUCCESS;
	}
	public String caseAddReggo3() throws Exception {
		/*boardView = dao.getcaseDetail(boardBean.getCase_seq(),boardBean.getCourt_step());
		setList(dao.getCase(boardBean.getCase_seq(),boardBean.getCourt_step()));*/
		dao.casecourt3(boardBean.getCase_seq());
		
		
		return SUCCESS;
	}
	
	public String casedeletepop() throws Exception {
		String result = "SUCCESS";
		dao.casedeletepop(boardBean);
		return result;
	}
	
	public String caseDeletego() throws Exception {
		String result = "SUCCESS";
		dao.caseDeletego(boardBean);
		return result;
	}
	
	public String caseDelete2() throws Exception {
		String result = "SUCCESS";
		
		System.out.println(boardBean.getCourt_step());
		dao.caseDelete2(boardBean);
		return result;
	}
	
	public String casecourtDelete() throws Exception {
		String result = "SUCCESS";
		
		System.out.println(boardBean.getCourt_step());
		dao.casecourtDelete(boardBean);
		return result;
	}
	
	public String caselogDelete() throws Exception {
		String result = "SUCCESS";
		dao.caselogDelete(boardBean);
		return result;
	}
	
	public String casecansel() throws Exception {
		String result = "SUCCESS";
		dao.casecourtDelete(boardBean);
		return result;
	}

	public String caseupdate() throws Exception {
				
		dao.caseupdate(boardBean);
		
		return SUCCESS;
	}
	
	public String caseupdate1() throws Exception {
		
		dao.caseupdate1(boardBean);
		
		return SUCCESS;
	}
	public String caseupdate2() throws Exception {
			
			dao.caseupdate1(boardBean);
			
			return SUCCESS;
		}
	public String caseupdate3() throws Exception {
		
		dao.caseupdate1(boardBean);
		
		return SUCCESS;
	}
	
	
	/*<!-- 셀렉트500 -->*/
	public String casegetseq() throws Exception {
		String result = "SUCCESS";
		// Case_seq가져오기
		boardView = dao.getTopCaseSeq();
		boardBean.setCase_seq(boardView.getCase_seq());
		System.out.println("Case_seq(): " + boardBean.getCase_seq());
		
		boardView = dao.casegetseq(boardBean.getCase_seq());
				
		return result;
	}
	
	public String getCase() throws Exception {
		// Case_seq가져오기
		
		boardView = dao.getTopCaseSeq();
		boardBean.setCase_seq(boardView.getCase_seq());
		
		setList(dao.getCase(boardBean.getCase_seq(),boardBean.getCourt_step()));
		
		return SUCCESS;
	}
	public String getCase2() throws Exception {
		// Case_seq가져오기
		boardView = dao.getTopCaseSeq();
		boardBean.setCase_seq(boardView.getCase_seq());
		
		setList(dao.getCase(boardBean.getCase_seq(),boardBean.getCourt_step()));
		
		return SUCCESS;
	}
	public String getCase3() throws Exception {
		// Case_seq가져오기
		boardView = dao.getTopCaseSeq();
		boardBean.setCase_seq(boardView.getCase_seq());
		
		setList(dao.getCase(boardBean.getCase_seq(),boardBean.getCourt_step()));
		
		return SUCCESS;
	}
	
	/*<!-- 인설트510 -->*/
	public String casecourt() throws Exception {
		
		String result = "SUCCESS";
		
		// Case_seq가져오기
		boardView = dao.getTopCaseSeq();
		boardBean.setCase_seq(boardView.getCase_seq());
		
		dao.casecourt(boardBean.getCase_seq());
		
		return result;
	}
		
	
	//1심다음
	public String updateCaseNext() throws Exception {
		String result = "SUCCESS";
		dao.updateCasecourt(boardBean);
				
		// Case_seq가져오기
		boardView = dao.getTopCaseSeq();
		boardBean.setCase_seq(boardView.getCase_seq());
		dao.casecourt2(boardBean.getCase_seq());
		
		return result;
	}
	
	//2심다음
	public String updateCaseNext2() throws Exception {
		String result = "SUCCESS";
		dao.updateCasecourt(boardBean);
		
		// Case_seq가져오기
		boardView = dao.getTopCaseSeq();
		boardBean.setCase_seq(boardView.getCase_seq());
		/*3인설트*/
		dao.casecourt3(boardBean.getCase_seq());
		return result;
	}
	
	//저장후 목록
	public String updateCaseSave() throws Exception {
		String result = "SUCCESS";
		
		dao.updateCasecourt(boardBean);
		
		return result;
	}
	
	//주요내용팝업
	public String insertContent() throws Exception {
		
			String result = "SUCCESS";
			/*dao.updateContent(boardBean.getCase_seq());*/
			dao.insertContent(boardBean);
			//방금 들어간 log_seq 가져오기 
			boardView = dao.getToplogSeq();
			boardBean.setLog_seq(boardView.getLog_seq());
			//파일업로드
			if(uploads != null) {
				List folder = getFileUploadTh(boardBean.getCourt_step());
				System.out.println("size : "+folder.size());
				Map map = new HashMap();
				for(int i = 0; i< folder.size(); i++){
					
					map = (HashMap)folder.get(i);
					
					System.out.println("fullFileName : "+(String)map.get("fullFileName"));
					System.out.println("timeFoler : "+(String)map.get("timeFoler"));
					boardBean.setFile_name((String)map.get("fullFileName"));
					boardBean.setAttach_seq((Integer)map.get("attach_seq"));
					
					boardBean.setFile_path("");
					//boardBean.setFile_path(filePath+boardBean.getBoard_code()+"/"+ folder +"/"+(String)map.get("fullFileName"));
					boardBean.setFile_path((String)map.get("timeFoler"));
					// 파일저장
					dao.insertcaseFile(boardBean);
				}
			
			}
			boardBean.setCourt_step(boardBean.getCourt_step());
			
			System.out.println(boardBean.getCourt_step());
			if (boardBean.getCourt_step().equals("1")){
				result = "one";
			}else if (boardBean.getCourt_step().equals("2")){
				result = "two";
			}else if (boardBean.getCourt_step().equals("3")){
				result = "three";
			}
			System.out.println("result : "+result);
			
			return result;
	}
	//주요내용팝업
	public String insertAddContent() throws Exception {
			
				String result = "SUCCESS";
				/*dao.updateContent(boardBean.getCase_seq());*/
				dao.insertContent(boardBean);
				
				//방금 들어간 log_seq 가져오기 
				boardView = dao.getToplogSeq();
				boardBean.setLog_seq(boardView.getLog_seq());
				
				boardBean.setCourt_step(boardBean.getCourt_step());
			
				//파일업로드
				if(uploads != null) {
					List<BoardBean> attachNumList = (List<BoardBean>)dao.AttachNumList(String.valueOf(boardBean.getLog_seq()));
					
					List folder = getFileUploadTh(boardBean.getCourt_step());
					System.out.println("size : "+folder.size());
					Map map = new HashMap();
					for(int i = 0; i< folder.size(); i++){
						
						map = (HashMap)folder.get(i);
						
						System.out.println("fullFileName : "+(String)map.get("fullFileName"));
						System.out.println("timeFoler : "+(String)map.get("timeFoler"));
						boardBean.setFile_name((String)map.get("fullFileName"));
						
						if(attachNumList.size() > 0){
							boardBean.setAttach_seq(Integer.parseInt(attachNumList.get(i).getNum()));
						}else{
							boardBean.setAttach_seq((Integer)map.get("attach_seq"));
						}
						boardBean.setFile_path("");
						//boardBean.setFile_path(filePath+boardBean.getBoard_code()+"/"+ folder +"/"+(String)map.get("fullFileName"));
						boardBean.setFile_path((String)map.get("timeFoler"));
					
					// 파일저장
					dao.insertcaseFile(boardBean);
					}
				} else {}	
				
				System.out.println(boardBean.getCourt_step());
				if (boardBean.getCourt_step().equals("2")){
					result = "two";
				}else if (boardBean.getCourt_step().equals("3")){
					result = "three";
				}
				System.out.println("result : "+result);
				
				return result;
		}
	
	public String AddContent() throws Exception {
		
		String result = "SUCCESS";
		/*dao.updateContent(boardBean.getCase_seq());*/
		dao.updateContent(boardBean);
		
		boardView = dao.getToplogSeq();
		boardBean.setLog_seq(boardView.getLog_seq());
		
		//파일업로드
		if(uploads!=null) {
			List<BoardBean> attachNumList = (List<BoardBean>)dao.AttachNumList(String.valueOf(boardBean.getLog_seq()));
			
			List folder = getFileUploadTh(boardBean.getCourt_step());
			System.out.println("size : "+folder.size());
			Map map = new HashMap();
			for(int i = 0; i< folder.size(); i++){
				
				map = (HashMap)folder.get(i);
				
				System.out.println("fullFileName : "+(String)map.get("fullFileName"));
				System.out.println("timeFoler : "+(String)map.get("timeFoler"));
				boardBean.setFile_name((String)map.get("fullFileName"));
				
				if(attachNumList.size() > 0){
					boardBean.setAttach_seq(Integer.parseInt(attachNumList.get(i).getNum()));
				}else{
					boardBean.setAttach_seq((Integer)map.get("attach_seq"));
				}
				boardBean.setFile_path("");
				//boardBean.setFile_path(filePath+boardBean.getBoard_code()+"/"+ folder +"/"+(String)map.get("fullFileName"));
				boardBean.setFile_path((String)map.get("timeFoler"));
			
			// 파일저장
			dao.insertcaseFile(boardBean);
			}
		} else {}		
		
		boardBean.setCase_seq(boardBean.getCase_seq());
		boardBean.setCourt_step(boardBean.getCourt_step());
		System.out.println(boardBean.getCase_seq());
		System.out.println(boardBean.getCourt_step());
		if (boardBean.getCourt_step().equals("1")){
			result = "one";
		}else if (boardBean.getCourt_step().equals("2")){
			result = "two";
		}else if (boardBean.getCourt_step().equals("3")){
			result = "three";
		}
		System.out.println("result : "+result);
		
		return result;
}
	//주요내용팝업
		public String updateContent() throws Exception {
			
				String result = "SUCCESS";
				/*dao.updateContent(boardBean.getCase_seq());*/
				dao.updateContent(boardBean);
				
				//파일업로드
				if(uploads!=null) {
					List<BoardBean> attachNumList = (List<BoardBean>)dao.AttachNumList(String.valueOf(boardBean.getLog_seq()));
					
					List folder = getFileUploadTh(boardBean.getCourt_step());
					System.out.println("size : "+folder.size());
					Map map = new HashMap();
					for(int i = 0; i< folder.size(); i++){
						
						map = (HashMap)folder.get(i);
						
						System.out.println("fullFileName : "+(String)map.get("fullFileName"));
						System.out.println("timeFoler : "+(String)map.get("timeFoler"));
						boardBean.setFile_name((String)map.get("fullFileName"));
						
						if(attachNumList.size() > 0){
							boardBean.setAttach_seq(Integer.parseInt(attachNumList.get(i).getNum()));
						}else{
							boardBean.setAttach_seq((Integer)map.get("attach_seq"));
						}
						boardBean.setFile_path("");
						//boardBean.setFile_path(filePath+boardBean.getBoard_code()+"/"+ folder +"/"+(String)map.get("fullFileName"));
						boardBean.setFile_path((String)map.get("timeFoler"));
					
					// 파일저장
					dao.insertcaseFile(boardBean);
					}
				} else {}		
				
				boardBean.setCourt_step(boardBean.getCourt_step());
				boardBean.setCase_seq(boardBean.getCase_seq());
				System.out.println(boardBean.getCase_seq());
								
				System.out.println(boardBean.getCourt_step());
				if (boardBean.getCourt_step().equals("1")){
					result = "one";
				}else if (boardBean.getCourt_step().equals("2")){
					result = "two";
				}else if (boardBean.getCourt_step().equals("3")){
					result = "three";
				}
				System.out.println("result : "+result);
				
				return result;
		}


	public String insertBoard() throws Exception {
		ActionContext context = ActionContext.getContext();
		filePath = getText("path.upload.board");
		String result = "SUCCESS";
		
		dao.insertBoard(boardBean);
		
		// board_seq가져오기
		boardView = dao.getTopBoardSeq();
		boardBean.setBoard_seq(boardView.getBoard_seq());
		
		//파일업로드
		if(uploads != null) {
			List folder = getFileUploadMulti(boardBean.getBoard_code());
			System.out.println("size : "+folder.size());
			Map map = new HashMap();
			for(int i = 0; i< folder.size(); i++){
				
				map = (HashMap)folder.get(i);
				
				System.out.println("fullFileName : "+(String)map.get("fullFileName"));
				System.out.println("timeFoler : "+(String)map.get("timeFoler"));
				boardBean.setFile_name((String)map.get("fullFileName"));
				boardBean.setAttach_seq((Integer)map.get("attach_seq"));
				
				boardBean.setFile_path("");
				//boardBean.setFile_path(filePath+boardBean.getBoard_code()+"/"+ folder +"/"+(String)map.get("fullFileName"));
				boardBean.setFile_path((String)map.get("timeFoler"));
				// 파일저장
				dao.insertFile(boardBean);
			}
			/*		
			boardBean.setFile_name(uploadsFileName);
			boardBean.setFile_path(filePath+boardBean.getBoard_code()+"/"+ folder +"/"+uploadsFileName);
			
			// board_seq가져오기
			boardView = dao.getTopBoardSeq();
			boardBean.setBoard_seq(boardView.getBoard_seq());
			// 파일저장
			dao.insertFile(boardBean);
			*/
		}
		//사이버mail 부분
			System.out.println("****"+boardBean.getBoard_code());
			if(boardBean.getBoard_code().equals("BD400")) {	
				boardView = dao.getTopBoardSeq();
				System.out.println("***메일들어옴");
				System.out.println("***"+boardView.getBoard_seq());
				BoardBean info = dao.getBoardView(boardView.getBoard_seq());
				
				Map<String, String> mailDataMap = new HashMap<String, String>();
				mailDataMap.put("receiver", "성헌모");
				mailDataMap.put("receiverEmail", getText("cyber.mail.addr"));
				mailDataMap.put("subject", "현대엘리베이터 준법지원 : 사이버제보");
				mailDataMap.put("sender", "현대엘리베이터 준법지원");
				mailDataMap.put("senderEmail", "noreply@hdel.co.kr");
				mailDataMap.put("contentsGubun", "contents");
				mailDataMap.put("content", info.getContent());
				mailDataMap.put("memNo", info.getMem_no());
				mailDataMap.put("memName", info.getMem_name());
				mailDataMap.put("writeTime", info.getWrite_time() );
				
			 MailManager.getInstance().doMailSendSimple(mailDataMap);
			 
			 result = "CYBER";
		}
		//다른 게시판 mail
		/*System.out.println("****"+boardBean.getBoard_code());
		if(boardBean.getBoard_code().equals("BD400")) {	
			boardView = dao.getTopBoardSeq();
			System.out.println("***메일들어옴");
			System.out.println("***"+boardView.getBoard_seq());
			BoardBean info = dao.getBoardView(boardView.getBoard_seq());
			
			Map<String, String> mailDataMap = new HashMap<String, String>();
			mailDataMap.put("receiver", "성헌모");
			mailDataMap.put("receiverEmail", getText("cyber.mail.addr"));
			mailDataMap.put("subject", "현대엘리베이터 준법지원 : 사이버제보");
			mailDataMap.put("sender", "현대엘리베이터 준법지원");
			mailDataMap.put("senderEmail", "noreply@hdel.co.kr");
			mailDataMap.put("contentsGubun", "contents");
			mailDataMap.put("content", info.getContent());
			mailDataMap.put("memNo", info.getMem_no());
			mailDataMap.put("memName", info.getMem_name());
			mailDataMap.put("writeTime", info.getWrite_time() );
			
			 MailManager.getInstance().doMailSendSimple(mailDataMap);
			 
			 result = "CYBER";
		}
		*/
		return result;
	}
	
	public String updateBoardForm() throws Exception {
		boardView = dao.getBoardView(boardBean.getBoard_seq());
		fileView = dao.getFile(boardBean.getBoard_seq(),boardBean.getSave_type());
		
		/*fileView.setFile_name1(fileView.getFile_name1().substring(fileView.getFile_name1().lastIndexOf("/") + 1));
		fileView.setFile_name2(fileView.getFile_name2().substring(fileView.getFile_name2().lastIndexOf("/") + 1));
		fileView.setFile_name3(fileView.getFile_name3().substring(fileView.getFile_name3().lastIndexOf("/") + 1));
	*/
		return SUCCESS;
	}
	
	public String updateBoard() throws Exception {
		fileView = dao.getFile(boardBean.getBoard_seq(),boardBean.getSave_type());
		
		ActionContext context = ActionContext.getContext();
		filePath = getText("path.upload.board");
		//파일업로드
		if(uploads!=null) {
			/*System.out.println("들어옴");
			String folder = getFileUpload(boardBean.getBoard_code());
					
			boardBean.setFile_name(uploadsFileName);
			boardBean.setFile_path(filePath+boardBean.getBoard_code()+"/"+ folder +"/"+uploadsFileName);
			
			System.out.println("*****fileview : " + fileView);
			*/
			System.out.println("boardBean.getBoard_seq() : " + boardBean.getBoard_seq());
			List<BoardBean> attachNumList = (List<BoardBean>)dao.getAttachNumList(String.valueOf(boardBean.getBoard_seq()));
			
			List folder = getFileUploadMulti(boardBean.getBoard_code());
			System.out.println("size : "+folder.size());
			Map map = new HashMap();
			for(int i = 0; i< folder.size(); i++){
				
				map = (HashMap)folder.get(i);
				
				System.out.println("fullFileName : "+(String)map.get("fullFileName"));
				System.out.println("timeFoler : "+(String)map.get("timeFoler"));
				boardBean.setFile_name((String)map.get("fullFileName"));
				
				if(attachNumList.size() > 0){
					boardBean.setAttach_seq(Integer.parseInt(attachNumList.get(i).getNum()));
				}else{
					boardBean.setAttach_seq((Integer)map.get("attach_seq"));
				}
				boardBean.setFile_path("");
				//boardBean.setFile_path(filePath+boardBean.getBoard_code()+"/"+ folder +"/"+(String)map.get("fullFileName"));
				boardBean.setFile_path((String)map.get("timeFoler"));
			
			// 파일저장
			dao.insertFile(boardBean);
			}
		} else {}		
		System.out.println("boardBean pw : "+boardBean.getPw());
		dao.updateBoard(boardBean);
		
		return SUCCESS;
	}
		
	public String deleteBoard() throws Exception {
		fileView = dao.getFile(boardBean.getBoard_seq(),"board");
		// 파일삭제(경로)
		if(fileView != null){
			fileUpLoadPath = getText("path.upload.prefix");
			String fileFullPath = fileUpLoadPath + fileView.getFile_path();
			File saveFile = new File(fileFullPath);	
			saveFile.delete();
			
			// 파일삭제(디비)
			dao.deleteFile(boardBean);
		}
		
		dao.deleteBoard(boardBean.getBoard_seq());
		
		return SUCCESS;
	}
	
	
	public String insertAnswer() throws Exception {
		dao.insertAnswer(boardBean);
		
		filePath = getText("path.upload.board");
		//파일업로드
		if(uploads!=null) {
			System.out.println("들어옴");
			String folder = getFileUpload(boardBean.getBoard_code());
							
			boardBean.setFile_name(uploadFileName);
			boardBean.setFile_path(filePath+boardBean.getBoard_code()+"/"+ folder +"/"+uploadFileName);
					
			System.out.println("*****fileview : " + fileView);

			dao.insertFile(boardBean);
		} else {}
				
		return SUCCESS;
	}
	
	public String updateAnswerForm() throws Exception {
		boardView = dao.getBoardView(boardBean.getBoard_seq());
		fileView = dao.getFile(boardBean.getBoard_seq(),"board");
		answerFile = dao.getoneFile(boardBean.getBoard_seq(),boardBean.getSave_type());
		
		return SUCCESS;
	}

	
	public String updateAnswer() throws Exception {
	    this.fileView = this.dao.getoneFile(this.boardBean.getBoard_seq(), this.boardBean.getSave_type());

	    ActionContext context = ActionContext.getContext();
	    this.filePath = getText("path.upload.board");

	    if (this.upload != null) {
	      System.out.println("들어옴");
	      String folder = getFileUpload(this.boardBean.getBoard_code());

	      this.boardBean.setFile_name(this.uploadFileName);
	      this.boardBean.setFile_path(this.filePath + this.boardBean.getBoard_code() + "/" + folder + "/" + this.uploadFileName);

	      System.out.println("*****fileview : " + this.fileView);

	      if (this.fileView == null) {
	        this.dao.insertFile(this.boardBean);
	      } else if (this.fileView != null) {
	        this.boardBean.setAttach_seq(this.fileView.getAttach_seq());
	        this.dao.updateFile(this.boardBean);
	      }
	    }
	    this.dao.updateAnswer(this.boardBean);

	    return "success";
	  }
		
	public String deleteAnswer() throws Exception {
		answerFile = dao.getoneFile(boardBean.getBoard_seq(),"answer");
		// 파일삭제(경로)
		if(answerFile != null){
			BoardBean downloadBean = dao.getoneFile(boardBean.getBoard_seq(),"answer");
			downFile = downloadBean.getFile_name();
			downloadBean.setAttach_seq(boardBean.getAttach_seq());
			downloadBean.setSave_type(boardBean.getSave_type());
			
			File dFile = new File(downloadBean.getFile_name());
				
			// 파일삭제(디비)
			dao.deleteFile(downloadBean);
		}
		
		dao.deleteAnswer(boardBean.getBoard_seq());
		
		return SUCCESS;
	}
	
	private String getFileUpload(String board_code) throws IOException {
	    System.out.println("들어옴2");
	    this.fileUpLoadPath = getText("path.upload.prefix");
	    this.filePath = getText("path.upload.board");

	    if (this.upload != null)
	    {
	      Calendar calendar = Calendar.getInstance();
	      SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmssSSS");
	      System.out.println("시간 : " + dateFormat.format(calendar.getTime()));

	      this.timeFolderName = dateFormat.format(calendar.getTime());
	      String timeFoler = this.fileUpLoadPath + this.filePath + board_code + "/" + this.timeFolderName;
	      String fullFileName = this.fileUpLoadPath + this.filePath + board_code + "/" + this.timeFolderName + "/" + this.uploadFileName;
	      File createF = new File(timeFoler);
	      createF.mkdirs();
	      System.out.println("******" + fullFileName);
	      File deskFile = new File(fullFileName);

	      if (!deskFile.exists()) {
	        deskFile.createNewFile();
	      }
	      FileUtils.copyFile(getUpload(), deskFile);
	    }
	    return this.timeFolderName;
	  }
	
	
	private List getFileUploadMulti(String board_code) throws IOException {
		System.out.println("들어옴 multi");
		List list = new ArrayList();
		
		fileUpLoadPath = getText("path.upload.prefix");
		filePath = getText("path.upload.board");

		if(uploads != null) {
			// 타임스탬프(폴더)
			Map map = null;
			Calendar calendar = Calendar.getInstance();
			SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmssSSS");
			System.out.println("시간 : " + dateFormat.format(calendar.getTime()));
			timeFolderName = dateFormat.format(calendar.getTime());
			
			for(int i = 0; i < uploads.size(); i++){
				map = new HashMap();
				
				String timeFoler = fileUpLoadPath + filePath + board_code + "/"+ timeFolderName;
				String fullFileName = fileUpLoadPath + filePath + board_code + "/"+ timeFolderName + "/" + uploadsFileName.get(i);
				String fullFileReName = timeFolderName + i;
				
				File createF = new File(timeFoler);
				createF.mkdirs();
				System.out.println("******"+fullFileReName);
				File deskFile = new File(fullFileName);
				
				if(!deskFile.exists()) {
					deskFile.createNewFile();
				}
				FileUtils.copyFile(uploads.get(i), deskFile);
				
				System.out.println("timeFolder : "+timeFoler);
				
				//list.put("timeFolderName", timeFolderName);
				map.put("fullFileName", fullFileName);
				map.put("timeFoler", timeFoler);
				map.put("fullFileReName", fullFileReName);
				map.put("attach_seq", i + 1);
				System.out.println("fileName 111111 : "+fullFileName);
				System.out.println("i : " + i);
				list.add(map);
			}
		}
		return list;
	}
	/*소송관련*/
	private List getFileUploadTh(String court_step) throws IOException {
		System.out.println("들어옴 multi");
		List list = new ArrayList();
		
		fileUpLoadPath = getText("path.upload.prefix");
		filePath = getText("path.upload.board");

		if(uploads != null) {
			// 타임스탬프(폴더)
			Map map = null;
			Calendar calendar = Calendar.getInstance();
			SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmssSSS");
			System.out.println("시간 : " + dateFormat.format(calendar.getTime()));
			timeFolderName = dateFormat.format(calendar.getTime());
			
			for(int i = 0; i < uploads.size(); i++){
				map = new HashMap();
				
				String timeFoler = fileUpLoadPath + filePath + court_step + "/"+ timeFolderName;
				String fullFileName = fileUpLoadPath + filePath + court_step + "/"+ timeFolderName + "/" + uploadsFileName.get(i);
				String fullFileReName = timeFolderName + i;
				
				File createF = new File(timeFoler);
				createF.mkdirs();
				System.out.println("******"+fullFileReName);
				File deskFile = new File(fullFileName);
				
				if(!deskFile.exists()) {
					deskFile.createNewFile();
				}
				FileUtils.copyFile(uploads.get(i), deskFile);
				
				System.out.println("timeFolder : "+timeFoler);
				
				//list.put("timeFolderName", timeFolderName);
				map.put("fullFileName", fullFileName);
				map.put("timeFoler", timeFoler);
				map.put("fullFileReName", fullFileReName);
				map.put("attach_seq", i + 1);
				System.out.println("fileName 111111 : "+fullFileName);
				System.out.println("i : " + i);
				list.add(map);
			}
		}
		return list;
	}
	
	public String deleteFile() throws Exception {
		System.out.println("boardBean.getBoard_code() : "+boardBean.getBoard_code());
		//fileView = dao.getFile(boardBean.getBoard_seq(),boardBean.getSave_type());
		BoardBean downloadBean = dao.getFileDown(boardBean.getBoard_seq(),boardBean.getSave_type(), boardBean.getAttach_seq());
		downFile = downloadBean.getFile_name();
		downloadBean.setAttach_seq(boardBean.getAttach_seq());
		downloadBean.setSave_type(boardBean.getSave_type());
		
		File dFile = new File(downloadBean.getFile_name());
		System.out.println("다운경로 : " + dFile);		
		// 파일삭제(경로)
		/*fileUpLoadPath = getText("path.upload.prefix");
		String fileFullPath = fileUpLoadPath + fileView.getFile_path();
		File saveFile = new File(fileFullPath);	
		saveFile.delete();*/
		
		// 파일삭제(디비)
		dao.deleteFile(downloadBean);
		
		return SUCCESS;
	}
	
	public String casedeleteFile() throws Exception {
		String result = "SUCCESS";
		//fileView = dao.getFile(boardBean.getBoard_seq(),boardBean.getSave_type());
		BoardBean downloadBean = dao.getFilecaseDown(boardBean.getCase_seq(), boardBean.getLog_seq(),boardBean.getCourt_step(), boardBean.getAttach_seq());
		downFile = downloadBean.getFile_name();
		downloadBean.setAttach_seq(boardBean.getAttach_seq());
		downloadBean.setCourt_step(boardBean.getCourt_step());
		downloadBean.setCase_seq(boardBean.getCase_seq());
		downloadBean.setLog_seq(boardBean.getLog_seq());
				
		File dFile = new File(downloadBean.getFile_name());
		System.out.println("다운경로 : " + dFile);		
		System.out.println("downloadBean.getFile_path() : "+downloadBean.getFile_path());
		
		// 파일삭제(디비)
		dao.casedeleteFile(downloadBean);
		
		return result;
	}
	
	public String boarddeleteFile() throws Exception {
		System.out.println("boardBean.getBoard_code() : "+boardBean.getBoard_code());
		//fileView = dao.getFile(boardBean.getBoard_seq(),boardBean.getSave_type());
		BoardBean downloadBean = dao.getFileDown(boardBean.getBoard_seq(),boardBean.getSave_type(), boardBean.getAttach_seq());
		downFile = downloadBean.getFile_name();
		downloadBean.setAttach_seq(boardBean.getAttach_seq());
		downloadBean.setSave_type(boardBean.getSave_type());
				
		File dFile = new File(downloadBean.getFile_name());
		System.out.println("다운경로 : " + dFile);		
		System.out.println("downloadBean.getFile_path() : "+downloadBean.getFile_path());
		
		// 파일삭제(디비)
		dao.deleteFile(downloadBean);
		
		return SUCCESS;
	}
	public String fileDownloadTh() throws Exception {
		//BoardBean downloadBean = dao.getFile(boardBean.getBoard_seq(),boardBean.getSave_type());
		BoardBean downloadBean = dao.getFilecaseDown(boardBean.getCase_seq(), boardBean.getLog_seq(),boardBean.getCourt_step(), boardBean.getAttach_seq());
		downFile = downloadBean.getFile_name();
		
		System.out.println("file_name:"+downFile);
		System.out.println("this.getText : "+this.getText("path.upload.prefix"));
		System.out.println("downloadBean.getFile_path() : "+downloadBean.getFile_path());
		
		//File dFile = new File(this.getText("path.upload.prefix") + downloadBean.getFile_path());
		File dFile = new File(downloadBean.getFile_name());
		System.out.println("다운경로 : " + dFile);		
		
		if(dFile.length() > 0) {
			contentLength = (int)dFile.length();
			contentDisposition = "attachment;filename=" + new String(downFile.getBytes("MS949"),"ISO8859_1") + ";";
			inputStream = new FileInputStream(dFile);
			
			return SUCCESS;
		}else
	    {
	    	// 파일이 존재하지 않을 경우. 에러 페이지로 포워딩한다.
			return ERROR;
	    }
	}
	
	 public String fileoneDownload() throws Exception {
		    BoardBean downloadBean = this.dao.getoneFile(this.boardBean.getBoard_seq(), this.boardBean.getSave_type());

		    this.downFile = downloadBean.getFile_name();

		    File dFile = new File(getText("path.upload.prefix") + downloadBean.getFile_path());
		    System.out.println("다운경로 : " + dFile);

		    if (dFile.length() > 0L) {
		      this.contentLength = (int)dFile.length();
		      this.contentDisposition = ("attachment;filename=" + new String(this.downFile.getBytes("MS949"), "ISO8859_1") + ";");
		      this.inputStream = new FileInputStream(dFile);

		      return "success";
		    }

		    return "error";
		  }
	
	public String fileDownload() throws Exception {
		//BoardBean downloadBean = dao.getFile(boardBean.getBoard_seq(),boardBean.getSave_type());
		BoardBean downloadBean = dao.getFileDown(boardBean.getBoard_seq(),boardBean.getSave_type(), boardBean.getAttach_seq());
		downFile = downloadBean.getFile_name();
		
		System.out.println("file_name:"+downFile);
		System.out.println("this.getText : "+this.getText("path.upload.prefix"));
		System.out.println("downloadBean.getFile_path() : "+downloadBean.getFile_path());
		
		//File dFile = new File(this.getText("path.upload.prefix") + downloadBean.getFile_path());
		File dFile = new File(downloadBean.getFile_name());
		System.out.println("다운경로 : " + dFile);		
		
		if(dFile.length() > 0) {
			contentLength = (int)dFile.length();
			contentDisposition = "attachment;filename=" + new String(downFile.getBytes("MS949"),"ISO8859_1") + ";";
			inputStream = new FileInputStream(dFile);
			
			return SUCCESS;
		}else
	    {
	    	// 파일이 존재하지 않을 경우. 에러 페이지로 포워딩한다.
			return ERROR;
	    }
	}

	/*  public String fileanswerDownload() throws Exception {
	    BoardBean downloadBean = this.dao.getFile(this.boardBean.getBoard_seq(), this.boardBean.getSave_type());

	    this.downFile = downloadBean.getFile_name();

	    File dFile = new File(getText("path.upload.prefix") + downloadBean.getFile_path());
	    System.out.println("다운경로 : " + dFile);

	    if (dFile.length() > 0L) {
	      this.contentLength = (int)dFile.length();
	      this.contentDisposition = ("attachment;filename=" + new String(this.downFile.getBytes("MS949"), "ISO8859_1") + ";");
	      this.inputStream = new FileInputStream(dFile);

	      return "success";
	    }*/

	
	public String pdfDownload() throws Exception
	{
		downFile = boardBean.getPdfName();
		System.out.println(boardBean.getPdfName());
		
		String path = this.getText("path.pdf.prefix");
		String f1 = downFile.substring(0, 1);
		String f2 = downFile.substring(0, 2);
		filePath = path + f1 + "/" + f2 + "/" + downFile;
		boardBean.setSearch(filePath);
		System.out.println(path);
		System.out.println(f1);
		System.out.println(f2);
		System.out.println(filePath);
		
	    File dFile = new File(filePath);
	    
	    if(dFile.length() > 0)
		{
		    contentLength = (int)dFile.length();
		    contentDisposition = "attachment;filename=" + new String(downFile.getBytes("MS949"),"ISO8859_1")+";";	   
		    inputStream = new FileInputStream(dFile);
		   
		    return SUCCESS;
		}
	    else
	    {
	    	// 파일이 존재하지 않을 경우. 에러 페이지로 포워딩한다.
			return "RET";
	    }
	}
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	public List<BoardBean> getPrintlist2() {
		return printlist2;
	}

	public void setPrintlist2(List<BoardBean> printlist2) {
		this.printlist2 = printlist2;
	}

	public List<BoardBean> getPrintlist3() {
		return printlist3;
	}

	public void setPrintlist3(List<BoardBean> printlist3) {
		this.printlist3 = printlist3;
	}

	public BoardBean getPrintView1() {
		return printView1;
	}

	public void setPrintView1(BoardBean printView1) {
		this.printView1 = printView1;
	}

	public BoardBean getPrintView2() {
		return printView2;
	}

	public void setPrintView2(BoardBean printView2) {
		this.printView2 = printView2;
	}

	public BoardBean getPrintView3() {
		return printView3;
	}

	public void setPrintView3(BoardBean printView3) {
		this.printView3 = printView3;
	}

	public File getUpload() {
		return upload;
	}

	public void setUpload(File upload) {
		this.upload = upload;
	}

	public String getUploadFileName() {
		return uploadFileName;
	}

	public void setUploadFileName(String uploadFileName) {
		this.uploadFileName = uploadFileName;
	}

	public String getUploadContentType() {
		return uploadContentType;
	}

	public void setUploadContentType(String uploadContentType) {
		this.uploadContentType = uploadContentType;
	}

	@Override
	public BoardBean getModel() {
		return boardBean;
	}

	@Override
	public void prepare() throws Exception {
		boardBean = new BoardBean();
	}

	public BoardBean getBoardBean() {
		return boardBean;
	}

	public void setBoardBean(BoardBean boardBean) {
		this.boardBean = boardBean;
	}

	public BoardBean getBoardView() {
		return boardView;
	}

	public void setBoardView(BoardBean boardView) {
		this.boardView = boardView;
	}

	public BoardBean getFileView() {
		return fileView;
	}

	public void setFileView(BoardBean fileView) {
		this.fileView = fileView;
	}

	public BoardBean getAnswerFile() {
		return answerFile;
	}

	public void setAnswerFile(BoardBean answerFile) {
		this.answerFile = answerFile;
	}

	public void setList(List<BoardBean> list) {
		this.list = list;
	}
	
	public List<BoardBean> getList() {
		return list;
	}

	

	public List<File> getUploads() {
		return uploads;
	}

	public void setUploads(List<File> uploads) {
		this.uploads = uploads;
	}

	public List<String> getUploadsFileName() {
		return uploadsFileName;
	}

	public void setUploadsFileName(List<String> uploadsFileName) {
		this.uploadsFileName = uploadsFileName;
	}

	public List<String> getUploadsContentType() {
		return uploadsContentType;
	}

	public void setUploadsContentType(List<String> uploadsContentType) {
		this.uploadsContentType = uploadsContentType;
	}

	

	public String getFileUpLoadPath() {
		return fileUpLoadPath;
	}

	public void setFileUpLoadPath(String fileUpLoadPath) {
		this.fileUpLoadPath = fileUpLoadPath;
	}

	public String getFilePath() {
		return filePath;
	}

	public void setFilePath(String filePath) {
		this.filePath = filePath;
	}

	public String[] getImgs() {
		return imgs;
	}

	public void setImgs(String[] imgs) {
		this.imgs = imgs;
	}

	public int getTotalCount() {
		return totalCount;
	}

	public void setTotalCount(int totalCount) {
		this.totalCount = totalCount;
	}

	

	public InputStream getInputStream() {
		return inputStream;
	}

	public void setInputStream(InputStream inputStream) {
		this.inputStream = inputStream;
	}

	public int getContentLength() {
		return contentLength;
	}

	public void setContentLength(int contentLength) {
		this.contentLength = contentLength;
	}

	public String getContentDisposition() {
		return contentDisposition;
	}

	public void setContentDisposition(String contentDisposition) {
		this.contentDisposition = contentDisposition;
	}

	public String getDownFile() {
		return downFile;
	}

	public void setDownFile(String downFile) {
		this.downFile = downFile;
	}

	public String getTimeFolderName() {
		return timeFolderName;
	}

	public void setTimeFolderName(String timeFolderName) {
		this.timeFolderName = timeFolderName;
	}
	
	
	
}
